1. Technical Field
The present disclosure relates to code obfuscation and more specifically to obfuscating source code using a common function.
2. Introduction
Software publishers often attempt to restrict access to portions of compiled software executables to thwart would-be reverse engineering while still allowing the executables to function properly. Reverse engineering is the practice of dissecting and/or analyzing software to understand how it works. On certain systems, reverse engineering can retrieve information stored within software such as information related to cryptographic keys or copy protection schemes. Reverse engineers can even tamper with the software itself or call specific portions of the software for their own unauthorized purposes.
One approach to thwart reverse engineering and other attacks is to reduce the number of entry points into a dynamically linked library (DLL). This can be accomplished by in-lining tasks that were previously separate functions. For large functions or commonly used functions however, this approach quickly leads to code bloat and can exceed stack and function size limits. Such code can be difficult to maintain because a single change must be propagated through all the in-lined portions of the code. Further, an attacker could compare portions of the code which are the same (i.e. in-lined) for clues as to the code's purpose and how it is used.